package club.justwill.single.assembler;

import club.justwill.single.bean.ProjectIntroduceResp;
import club.justwill.single.persistence.jpo.ProjectIntroduce;
import club.justwill.single.persistence.jpo.Projects;
import org.springframework.beans.factory.config.ConfigurableBeanFactory;
import org.springframework.context.annotation.Scope;
import org.springframework.stereotype.Component;

import java.util.ArrayList;
import java.util.List;

/**
 * Created by luoyu on 15-12-27.
 */
@Component
@Scope(ConfigurableBeanFactory.SCOPE_SINGLETON)
public class ProjectIntroduceAssemble {
    public List<ProjectIntroduceResp> assembleProjectsIntroduces(List<ProjectIntroduce> projectIntroduceList){

        List<ProjectIntroduceResp> projectIntroduceResps = new ArrayList<ProjectIntroduceResp>();

        for(ProjectIntroduce projectIntroduce: projectIntroduceList){
            projectIntroduceResps.add(assembleProjectsIntroduce(projectIntroduce));
        }
        return projectIntroduceResps;
    }


    public ProjectIntroduceResp assembleProjectsIntroduce(ProjectIntroduce projectIntroduce) {
        ProjectIntroduceResp projectIntroduceResp = new ProjectIntroduceResp(projectIntroduce);
        return projectIntroduceResp;
    }
}
